﻿<%@ Page Title="Respuesta de Oferta" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmDescuentosRespuesta.aspx.cs" Inherits="Crosland.Automotriz.Web.Repuestos.wFrmDescuentosRespuesta" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx1" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

    <script type="text/javascript">
        function MostrarAlerta() {
            popupErrores.Show();
        }
    </script>

    <div class="main-header" style="width:100%;">
        <div class="main-titulo" style="text-align: left">
            Listado de Ofertas</div>
    </div>

    <table width="100%">
        <tr>
            <td class="filas2" style="width: 125px">
                <dx:ASPxButton ID="btnVerDetalle" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Text="Ver Detalle" Width="120px" onclick="btnVerDetalle_Click">
                    <Image Url="~/Images/EstadoVehiculo2.gif">
                    </Image>
                </dx:ASPxButton>
            </td>
            <td class="filas2"  style="width: 165px">
                                <dx:ASPxButton ID="btnEnviarSolicitud" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Text="Confirmar Oferta" Width="160px" onclick="btnEnviarSolicitud_Click">
                                    <Image Url="~/Images/landscape.gif">
                                    </Image>
                                </dx:ASPxButton>
            </td>
            <td class="filas2" >
                <dx:ASPxButton ID="btnSalir" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                    Width="100px" onclick="btnSalir_Click">
                    <Image Url="~/Images/logout.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
        GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" HeaderText="" 
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100%">
        <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
            PaddingTop="10px" />
<ContentPaddings PaddingLeft="9px" PaddingTop="10px" PaddingRight="11px" 
            PaddingBottom="10px"></ContentPaddings>

        <HeaderStyle>
        <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
            PaddingTop="3px" />
<Paddings PaddingLeft="9px" PaddingTop="3px" PaddingRight="11px" PaddingBottom="6px"></Paddings>
        </HeaderStyle>
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
    <table width="100%">
        <tr>
            <td class="filas2"   style="width: 83px">
                <asp:Label ID="Label1" runat="server" Text="Organización:"></asp:Label>
            </td>
            <td class="filas2"  style="width: 185px">
                <dx:ASPxComboBox ID="cboOrganizacion" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="180px" AutoPostBack="True" 
                    OnSelectedIndexChanged="cboOrganizacion_SelectedIndexChanged" 
                    Height="30px">
                    <ItemStyle Height="30px" />
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <DropDownButton Width="20px">
                    </DropDownButton>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />

<Paddings PaddingLeft="5px"></Paddings>
                </dx:ASPxComboBox>
            </td>
            <td  class="filas2"  style="width: 101px">
                <asp:Label ID="Label2" runat="server" Text="Oficina:"></asp:Label>
            </td>
            <td class="filas2"  style="width: 185px">
                <dx:ASPxComboBox ID="cboOficina" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="180px">
                    <ItemStyle Height="30px" />
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <DropDownButton Width="20px">
                    </DropDownButton>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxComboBox>
            </td>
            <td class="filas2"   style="width: 48px">
                <asp:Label ID="Label3" runat="server" Text="Canal:"></asp:Label>
            </td>
            <td class="filas2"  width="155">
                <dx:ASPxComboBox ID="cboCanal" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="180px">
                    <ItemStyle Height="30px" />
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <DropDownButton Width="20px">
                    </DropDownButton>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxComboBox>
            </td>
            <td class="filas2" >
                <dx:ASPxButton ID="btnConsultar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" OnClick="btnConsultar_Click" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Consultar" 
                    Width="100px" Height="30px">
                    <Image Url="~/Images/search.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
        <tr>
            <td class="filas2"  style="width: 83px">
                <asp:Label ID="Label12" runat="server" Text="Estado:"></asp:Label>
            </td>
            <td class="filas2"  style="width: 185px">
                <dx:ASPxComboBox ID="cboEstado" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="180px">
                    <ItemStyle Height="30px" />
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <DropDownButton Width="20px">
                    </DropDownButton>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />

<Paddings PaddingLeft="5px"></Paddings>
                </dx:ASPxComboBox></td>
            <td class="filas2"  style="width: 101px">
                <asp:Label ID="Label4" runat="server" Text="Tipo Descuento:"></asp:Label>
            </td>
            <td class="filas2"  style="width: 185px">
                <dx:ASPxComboBox ID="cboTipoDescuento" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="180px">
                    <ItemStyle Height="30px" />
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <DropDownButton Width="20px">
                    </DropDownButton>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />

<Paddings PaddingLeft="5px"></Paddings>
                </dx:ASPxComboBox>
            </td>
            <td class="filas2"  colspan="2">
                <asp:CheckBox ID="chkActivas" runat="server" Checked="True" 
                    Text="Ver Ofertas Activas" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
            </dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>
    <dx:ASPxGridView ID="gvListado" runat="server" Caption="Listado de Ofertas" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" Width="100%" AutoGenerateColumns="False" 
        KeyFieldName="ID_VEN_OFERTA_CAB">
        <Columns>
            <dx:GridViewDataTextColumn Caption="Organización" FieldName="DES_ORG_VTA" 
                VisibleIndex="1" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Oficina" FieldName="DES_OFI_VTA" 
                VisibleIndex="2" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Canal" FieldName="DES_CANAL_DISTRIB" 
                VisibleIndex="3" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Tipo de Oferta" FieldName="TIPO_DESCUENTO" 
                VisibleIndex="4" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Fecha Inicial" FieldName="FEC_INICIO" 
                VisibleIndex="5" Width="100px">
                <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Fecha Final" FieldName="FEC_FIN" 
                VisibleIndex="6" Width="100px">
                <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Código" FieldName="ID_VEN_OFERTA_CAB" 
                VisibleIndex="0" Width="50px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="ESTADO" FieldName="ESTADO" VisibleIndex="7">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True" 
            AllowSelectSingleRowOnly="True" AllowDragDrop="False" AllowGroup="False" 
            AllowSort="False" />
        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesPager>
            <PageNumber ForeColor="#3E4846">
            </PageNumber>
            <Summary ForeColor="#1E395B">
            </Summary>
        </StylesPager>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>

          <dx:ASPxPopupControl ID="pcSolicitud" runat="server" AllowDragging="True" 
              CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
              CssPostfix="Office2010Blue" EnableHotTrack="False" 
              HeaderText="Responder" Modal="True" PopupHorizontalAlign="WindowCenter" 
              PopupVerticalAlign="WindowCenter" 
              SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
              Width="500px" CloseAction="CloseButton" PopupAction="None">
              <HeaderImage Url="~/Images/landscape.gif">
              </HeaderImage>
              <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
              </LoadingPanelImage>
              <HeaderStyle>
              <Paddings PaddingLeft="7px" />
              </HeaderStyle>
              <LoadingPanelStyle ImageSpacing="5px">
              </LoadingPanelStyle>
              <ContentCollection>
<dx:popupcontrolcontentcontrol ID="PopupControlContentControl1" runat="server" 
                      SupportsDisabledAttribute="True">
    <table width="100%">
        <tr>
            <td class="filas2" >
                <asp:Label ID="Label10" runat="server" Font-Bold="True" Text="Para:"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="filas2" >
                <asp:Label ID="lblEmailUsuario" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="filas2" >
                <asp:Label ID="Label11" runat="server" Font-Bold="True" Text="CC:"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="filas2" >
                <dx:aspxtextbox ID="txtCC" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="30px" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="300px">
                    <Paddings PaddingLeft="5px" />
                </dx:aspxtextbox>
            </td>
        </tr>
        <tr>
            <td class="filas2" >
                <asp:Label ID="Label9" runat="server" Font-Bold="True" Text="Observaciones:"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="filas2" >
                <dx:aspxmemo ID="txtObservacion" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="100px" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="500px">
                </dx:aspxmemo>
            </td>
        </tr>
        <tr>
            <td class="filas2" >
                <table width="100%">
                    <tr>
                        <td class="filas2"  width="155">
                            <dx:aspxbutton ID="btnGrabarSolicitudAprobado" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" OnClick="btnGrabarSolicitudAprobado_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                Text="Enviar Aprobado" Width="150px">
                                <ClientSideEvents Click="function(s, e) {
	e.processOnServer = confirm('¿Seguro de enviar la solicitud?');
}" />
                                <Image Url="~/Images/email2.png">
                                </Image>
                            </dx:aspxbutton>
                        </td>
                        <td class="filas2" >
                            <dx:aspxbutton ID="btnGrabarSolicitudRechazado" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" OnClick="btnGrabarSolicitudRechazado_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                Text="Enviar Rechazado" Width="160px">
                                <Image Url="~/Images/email1.PNG">
                                </Image>
                            </dx:aspxbutton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
                  </dx:popupcontrolcontentcontrol>
</ContentCollection>
          </dx:ASPxPopupControl>


          <dx:ASPxPopupControl ID="popupErrores" runat="server" AllowDragging="True" 
                    ClientInstanceName="popupErrores" CloseAction="CloseButton" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    EnableViewState="False" HeaderText="Mensaje" Modal="True" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
              Width="300px" EnableHotTrack="False">
                
                    <HeaderImage Url="~/Images/icon_message.png">
                    </HeaderImage>
                
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                    </LoadingPanelImage>
                    <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                    </HeaderStyle>
                
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                
                 <ContentCollection>
<dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">

    <br />
      <dx:ASPxPanel ID="ASPxPanel3" runat="server" DefaultButton="btCreate">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent2" runat="server">
                        <table width="100%">
                        <tr>
                        <td class="filas2"  align="center" valign="middle">
                        
                        
                        
                            <asp:Label ID="lblMensaje" runat="server"></asp:Label>
                            <br /> &nbsp;</td>
                        
                        </tr>
                        <tr>
                        <td class="filas2"  align="center">
                        
                       
                            <dx:ASPxButton ID="ASPxButton6" runat="server" AutoPostBack="False" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Aceptar" 
                                Width="10px">
                                <ClientSideEvents Click="function(s, e) {
	popupErrores.Hide();
}" />
                                <Image Url="~/Images/ok.png">
                                </Image>
                            </dx:ASPxButton>
                        
                        </td>
                        
                        </tr>
                        
                        
                        </table>




                 </dx:PanelContent>
    </PanelCollection>
   </dx:ASPxPanel>
   </dx:PopupControlContentControl>
</ContentCollection>
                </dx:ASPxPopupControl>


          </asp:Content>
